<extend name="Public/common"/>
<block name="othercss">
</block>
<block name="body">

<div class="mian" style="background-color: #f4f4f4">
    <div class="help">
        <div class="box">
            <div class="loc"><i class="icon iconloc"></i>您现在在这里：<a href="{:urlrotue('/')}">白宝库</a> > <a href="{:urlrotue('Member/index')}">个人中心</a> > <span class="on">我的消息</span>
            </div>
            <div class="clearfix help_list">
                <div class="right">
                    <h2 class="title" style="text-align: center">我的消息</h2>
                    <ul class="wdxx-sum">
                    <empty name="list"> <div style="margin-top:50px; text-align:center;">暂无消息</div></empty>
                   
                     <foreach name="list" item="item">
                        <li>
                            <div class="date">{$item.create_time}</div>
                            <div class="top">{$item.title}<a class="close" data-id="{$item.id}">X</a></div>
                            <div class="bottom">
                                <div class="lans">{$item.detail|trim_textarea}</div>
                                <if condition="$item['url'] neq ''"><a href="{$item.url}" target="_blank">查看详情</a></if>
                            </div>
                        </li>
                      </foreach>
                    </ul>
                       <div class="pagetion">
                          {$page}
                        </div>
                </div>
                
              <include file="Member:left_menu"/>
                
            </div>
        </div>
    </div>
</div>
</div>



<block name="otherjs">
 <script type="text/javascript">
 $(function(){
	 var url_del_message = "{:urlrotue('Member/message_del')}"
	 
   $('.close').on('click',function(){
	   var that = $(this)
	   var id = that.attr('data-id');
	  layer.confirm('确定删除该消息？', {
      btn: ['确认','取消'] //按钮
        }, function(){
		
	  $.ajax({
        url: url_del_message + '?id=' + id,
        cache: false,
        success: function(obj) {
            if (obj.status == 'success') {
				layer.msg('删除成功!', {icon: 1});
				that.parent().parent().remove()
            } else {
				
				layer.msg('删除消息出错!', {icon: 5});
            }
        }
    })
      	layer.closeAll();
		
      }, function(){
		  
        });   
	})
  })
 </script>

</block>


